From a65ccdb1c606018e8c924468feafc30595512c3c Mon Sep 17 00:00:00 2001 From: Sean Pringle Date: Fri, 20 Dec 2013 17:18:07 +1000 Subject: [PATCH] remove forced index causing full index scans bug 57285 Change-Id: I2a41553c60de53b156fda01faa89af7bdd29d065 --- includes/api/ApiQueryRandom.php | 1 - includes/specials/SpecialRandompage.php | 1 - 2 files changed, 2 deletions(-) diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php index e99038696f..0d54ffef09 100644 --- a/includes/api/ApiQueryRandom.php +++ b/includes/api/ApiQueryRandom.php @@ -60,7 +60,6 @@ class ApiQueryRandom extends ApiQueryGeneratorBase { $this->addWhereFld( 'page_namespace', $namespace ); $this->addWhereRange( 'page_random', 'newer', $randstr, null ); $this->addWhereFld( 'page_is_redirect', $redirect ); - $this->addOption( 'USE INDEX', 'page_random' ); if ( is_null( $resultPageSet ) ) { $this->addFields( array( 'page_id', 'page_title', 'page_namespace' ) ); } else { diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index c94d2b3517..086193e14a 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -144,7 +144,6 @@ class RandomPage extends SpecialPage { ), $this->extra ), 'options' => array( 'ORDER BY' => 'page_random', - 'USE INDEX' => 'page_random', 'LIMIT' => 1, ), 'join_conds' => array() -- 2.20.1